package Demo;

import java.util.Arrays;

public class TestDemo {
    public static void main(String[] args) {
        int[] array = new int[10];
        int ints = 4;
        Arrays.fill(array,ints);
        for(int x : array) {
            System.out.print(x + " ");
        }

    }

    public static void main3(String[] args) {
        int[] array2 = {1, 9, 3, 4, 29};
        String s = Arrays.toString(array2);
        System.out.println(s);
    }
    public static void main2(String[] args) {
        char[] array = {'a', 'b', 'c'};
        String s1 = Arrays.toString(array);
        System.out.println(s1);
    }
    public static void main1(String[] args) {
        char[] array = {'a', 'b', 'c'};
        String s1 = Arrays.toString(array);
        char[] array1 = Arrays.copyOf(array, array.length);
        char[] array43 = Arrays.copyOfRange(array, 0, array.length);
        System.out.println(array1);
        System.out.println(array43);
        int[] array2 = {1, 9, 3, 4, 29};
        int tmp = Arrays.binarySearch(array2, 2);
        System.out.println(tmp);
        Arrays.sort(array2);
        for (int x : array2) {
            System.out.print(x + " ");
        }
//        for (int i = 0; i < array2.length; i++) {
//            System.out.println(array2[i]);
//        }
    }
}